package org.utils.fp.collection;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author gus
 */
public final class CollectionFactory
{
    public static <K, T> Map<K, T> newHashMap()
    {
        return new HashMap<K, T>();
    }

    public static <K, T> Map<K, T> newHashMap(K[] keys, T[] values)
    {
        return new HashMap<K, T>();
    }

    public static <T> List<T> newArrayList(int capacity)
    {
        return new ArrayList(capacity);
    }
    public static <T> T[] emptyArray()
    {
        return (T[]) new Object[0];
    }

    public static <T> T[] array(T... objects)
    {
        return objects;
    }
}
